﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Uinside.CreditSystem.DomainModels.Models;

namespace Uinside.CreditSystem.Services
{
    public class CustomerService : BaseService
    {
        public CustomerService(CreditContext dbContext)
            : base(dbContext)
        {
        }

        public IEnumerable<Customer> GetAll()
        {
            return _creditContext.Customers; //.Where(i => i.Id != 1);
        }

        public Customer GetCompany()
        {
            var company = GetAll().First(i => i.Id == 1);
            return company;
            
        }
    }
}
